Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trim SQL statements #962

Closed
wants to merge 2 commits into from
Closed

Conversation

bgrainger
Copy link
Member

Related to #961.

This trims the SQL (from MySqlCommand.CommandText) for non-prepared commands before sending it to the server for execution.

This matches the behaviour of MySqlCommand.Prepare() better, as well as matching Connector/NET's behaviour in some trivial cases.

It does add some increased risk that unusual SQL will be transformed/truncated by this new code and thus introduce new bugs.

@bgrainger bgrainger linked an issue Mar 23, 2021 that may be closed by this pull request
@bgrainger
Copy link
Member Author

It does add some increased risk that unusual SQL will be transformed/truncated by this new code and thus introduce new bugs.

Indeed, the ADO.NET conformance tests found a problem: executing the command -- TODO: write SQL used to work, but now fails.

@bgrainger bgrainger closed this Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

CTE not working
1 participant